import requestNoToken from "@/utils/authRequest";
import request from "@/utils/authRequestWithToken";

export function register(data) {
  return requestNoToken({
    url: '/authUser/register',
    method: 'post',
    data
  })
}

export function login(data) {
  return requestNoToken({
    url: '/authUser/login',
    method: 'post',
    data
  })
}

export function getInfo(token) {
  return request({
    url: '/authUser/me',
    method: 'post',
    params: { token }
  })
}

export function logout() {
  return request({
    url: '/authUser/logout',
    method: 'post'
  })
}
